Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

160
Vistas
I just want to select the button with the text "Continue" within a website with cypress

When I search for the button by the common method it returns 2 results

cy.get('[data-testid="cc-button__element"] > [data-testid="cc-button__text"]')

screenshot-1

However, when I do the search with cypress's own tool, it does locate it quickly and returns 1 result.

cy.get('.block > [data-testid="cc-button"] > [data-testid="cc-button__element"]')

screenshot-2

I know that this is valid, however, I want to do it by the traditional method so that later if there are changes it does not affect my button search methods.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

If the text Continue occurs just once in your webpage you can use contains to find it and click it.

cy.contains('Continue').click()
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda